1. Field of the Invention
The present invention relates to an image processing apparatus for a static (still) image or a moving (motion) image, and particularly to an image processing apparatus that processes encoded data of an image in an encoded state.
2. Description of the Related Art
In the case of a digital camera, a digital video camera, a monitoring camera, and a monitoring system, for example, data of an image acquired by such a camera is generally compressed and encoded, and then is stored in a recording medium (or a storage medium). JPEG or MPEG is widely employed as an image compression and encoding method. In a case of JPEG or MPEG, when compressed and encoded image data is further compressed, the compressed and encoded image data is temporarily decoded and expanded (or decompressed at first), and is then compressed and encoded again.
A compression rate of the compression and encoding process is previously set by taking into account the capacity of a storage medium that stores encoded data. For example, according to Japanese Patent Application Laid-Open No. 5-64001, when the size of encoded data is determined to be larger than a memory size, an image processing apparatus decodes and expands the encoded data, and compresses the reproduced image data at a higher compression ratio again.
Recently, JPEG2000 (ISO/IEC FCD 15444-1) and Motion-JPEG2000 (ISO/IEC FCD 15444-3) are widely regarded as a new compression and encoding method that can replace JPEG or MPEG. In the case of JPEG, image degradation occurs at the time of the recompressing due to a generation (a compression type). On the other hand, in a case of data encoded by JPEG2000, a code amount (a compressing rate) can be adjusted in an encoded state, and image degradation due to a generation such as in JPEG does not occur. In the case of Motion-JPEG2000, consecutive plural static images constituting a moving image are handled as respective frames, but encoded data of each frame follows JPEG2000. A detailed description of JPEG2000 is found in “Next Generation Image Encoding Method JPEG2000” (author: Yasuyuki Nomizu, published by Triceps Inc., on Feb. 13, 2001).
When the remaining capacity of a storage medium that stores encoded image data becomes insufficient, there is a case where it is required to decrease the code amount of the encoded data. In this case, in order to determine an appropriate decreasing code amount by taking into account image quality, it is preferable to perform code amount decreasing over again from scratch. However, it is desired to prevent the image quality degradation at the time of the recompression due to a generation.
In the case of determining the contents of the moving image, it is efficient to decrease the number of frames to be reproduced in order to decrease the reproducing time. Particularly, in the case of a moving image acquired by the monitoring camera, if only the frames that include a target person or only the frames that correspond to a target motion can be reproduced, it is possible to efficiently determine the contents of the moving image. Furthermore, in order to determine the contents of the moving image in detail, it is preferable to also reproduce images of the frames that were not reproduced in accordance with a necessity. Meanwhile, it is convenient to appropriately discard frames that are determined as frames having less important contents.